﻿<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			a {
				margin: 20px;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<h1>{{title}}</h1>
			<a v-for="nav in navs" href="nav.url" v-once>{{nav.name}}</a>
		</div>
	
		<script src="vue.js"></script>
		<script>
			var vm = new Vue({
				el: '#app',
				data: {
					title: 'v-once指令的用法',
					navs: [
						{name: '首页', url: '/home'},
						{name: '新闻', url: '/news'},
						{name: '视频', url: '/video'},
					]
				}
			})
		</script>
	</body>
</html>